Range Queries / Distinct Values Queries II

// This problem is currently unsolved.